//
//  SARegistFirstStepViewController.m
//  SunOn
//
//  Created by mc on 2017/5/2.
//  Copyright © 2017年 NeoZhang. All rights reserved.
//  注册界面  第一步骤:输入工号

#import "SARegistFirstStepViewController.h"
#import "SARegistSecondStepViewController.h"

@interface SARegistFirstStepViewController ()

@property (weak, nonatomic) IBOutlet UIImageView *userImage;
@property (weak, nonatomic) IBOutlet UITextField *userName;
@property (weak, nonatomic) IBOutlet UITextField *workNumber;
@property (weak, nonatomic) IBOutlet UIButton *nextStep;
@property (weak, nonatomic) IBOutlet UIImageView *backImage;


//******layout*******//

@property (weak, nonatomic) IBOutlet NSLayoutConstraint *userImageHeadLayout;//107 iphone 7

@end

@implementation SARegistFirstStepViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self configureViewLayout];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - view action
//下一步
- (IBAction)nextStepAction:(id)sender {
    SARegistSecondStepViewController *secondRegist = [self.storyboard instantiateViewControllerWithIdentifier:@"SARegistSecondStepViewController"];
    [self presentViewController:secondRegist animated:YES completion:nil];
}

#pragma mark - view layout

- (void)configureViewLayout {
    self.userImageHeadLayout.constant = 107 * SAkHeight_scale;
    SAViewRadius(self.nextStep, 35 / 2);
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(backAction)];
    self.backImage.userInteractionEnabled = YES;
    [self.backImage addGestureRecognizer:tap];
}
#pragma mark - custom method
- (void)backAction {
    DLog(@"返回");
    [self dismissViewControllerAnimated:YES completion:nil];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
